<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/produceinfo/q_produce_use_kcmx/q_produce_use_kcmx.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/produceinfo/q_produce_use_kcmx/q_produce_use_kcmx.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '生产工位库存明细',
                name: 'q_produce_use_kcmx/q_produce_use_kcmx',
                url: "/q_produce_use_kcmx/",
                sortName: "配件编码,单号"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"单号":"","生产工位":"","配件编码":"","配件名称":""});
            const searchFormOptions = ref([[{"title":"单号","field":"单号","type":"like"},{"dataKey":"生产工位","data":[],"title":"生产工位","field":"生产工位","type":"select"},{"title":"配件编码","field":"配件编码","type":"like"},{"title":"配件名称","field":"配件名称","type":"like"}]]);
            const columns = ref([{field:'单号',title:'单号',type:'string',sort:true,width:120,align:'left',sort:true},
                       {field:'单据类型',title:'单据类型',type:'string',width:110,require:true,align:'left'},
                       {field:'生产工位',title:'生产工位',type:'string',bind:{ key:'生产工位',data:[]},width:110,align:'left'},
                       {field:'配件编码',title:'配件编码',type:'string',sort:true,width:110,align:'left'},
                       {field:'配件名称',title:'配件名称',type:'string',width:220,align:'left'},
                       {field:'工位数量',title:'工位数量',type:'float',width:110,align:'left'},
                       {field:'调整单退回中',title:'调整单退回中',type:'float',width:110,require:true,align:'left'},
                       {field:'可用数量',title:'可用数量',type:'float',width:110,align:'left'},
                       {field:'工位金额',title:'工位金额',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'工位无税金额',title:'工位无税金额',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'转入成本',title:'转入成本',type:'decimal',width:110,hidden:true,require:true,align:'left'},
                       {field:'转入无税成本',title:'转入无税成本',type:'decimal',width:110,hidden:true,require:true,align:'left'},
                       {field:'成本核算方式',title:'成本核算方式',type:'int',width:200,align:'left',bind:{ key:'成本核算方式',data:[]}},
                       {field:'转入库存id',title:'转入库存id',type:'guid',width:110,align:'left',hidden:true},
                       {field:'工位库存id',title:'工位库存id',type:'guid',width:200,align:'left',hidden:true},
                       {field:'ID',title:'ID',type:'guid',width:110,require:true,align:'left',hidden:true},
                       {field:'转入库位',title:'转入库位',type:'string',bind:{ key:'库位编码',data:[]},width:150,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
